#include "game_math.h"

int game_math_collide(SDL_Rect *r1, SDL_Rect *r2) {
	return (
		// collision on X
		(r1->x < (r2->x +r2->w)) !=
		((r1->x +r1->w) <= r2->x) &&
		// collision on Y
		(r1->y < (r2->y +r2->h)) !=
		((r1->y +r1->h) <= r2->y)
	);
}
